<!DOCTYPE html>
<html lang='en'>

<head>
    <meta charset='UTF-8'>
    <meta name='viewport' content='width=device-width, initial-scale=1.0'>
    <title>Document</title>
    <script src='./vue.js'></script>
</head>

<body>
    <div id='app'></div>

    <div id='bpp'></div>
</body>
<script>
    // 将公共被复用的内容单独提取在一个实例中
    //
    const mixin = {
        data() {
            return {

            }
        },
        mounted() {

        },
        methods: {
            add() {
                this.count++
            }
        },
        computed: {}
        // .....
    }

    const app = {
        data() {
            return {
                count: 100
            }
        },
        methods: {},
        mixins: [mixin]
    }
    const vm = Vue.createApp(app).mount('#app')



    const bpp = {
        data() {
            return {
                count: 100
            }
        },
        methods: {},
        mixins: [mixin]
    }
    const bvm = Vue.createApp(bpp).mount('#bpp')
</script>

</html>